import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueBus from 'vue-bus';
import $ from 'jquery'
import Mint from 'mint-ui';
import 'mint-ui/lib/style.css'
import '@/assets/styles/toc_IM.css'

import MessageController from '@/assets/scripts/MessageController.js'
Vue.use(Mint);
Vue.use(VueBus);
window.$=$;

Vue.config.productionTip = true;
new Vue({
  	router,
  	store,
  	render: h => h(App),
  	created(){
  		var _self =this;
  		var messageController= new MessageController({
			context:_self
		});
		Vue.prototype.$messageController=messageController;
  	},
  	watch:{
		$route:function(to,from){
			this.$store.commit({
  				type: 'changeCurrentPageName',
  				currentPageName:to.name
			});
		}
	},
}).$mount('#app')
